﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="OrderDetails.aspx.cs" Inherits="OrderDetails" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>Order Details Page</title>
    <style>
        select
        {
            width: 144px !important;
        }
        input
        {
            width: 140px !important;
        }
        .button
        {
            width: 80px !important;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table>
        <tr>
            <td width="15%">
                Order ID:
            </td>
            <td>
                <asp:TextBox ID="txtOrderID" runat="server" ReadOnly="true" Enabled="False"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                Product:
            </td>
            <td>
                <asp:DropDownList ID="DDLProduct" runat="server" Height="16px" Width="137px">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
                Unit Price:
            </td>
            <td>
                <asp:TextBox ID="txtUnitPrice" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" BorderStyle="None"
                    ControlToValidate="txtUnitPrice" Display="Dynamic" ErrorMessage="Can not be null"></asp:RequiredFieldValidator>
                <asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="txtUnitPrice"
                    Display="Dynamic" ErrorMessage="Invalid Input" MaximumValue="99999999" MinimumValue="1.0000"
                    Type="Double"></asp:RangeValidator>
            </td>
        </tr>
        <tr>
            <td>
                Quantity:
            </td>
            <td>
                <asp:TextBox ID="txtQty" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtQty"
                    Display="Dynamic" ErrorMessage="Can not be null"></asp:RequiredFieldValidator>
                <asp:RangeValidator ID="RangeValidator2" runat="server" ControlToValidate="txtQty"
                    Display="Dynamic" ErrorMessage="Invalid Input" MaximumValue="9999" MinimumValue="1"
                    Type="Integer"></asp:RangeValidator>
            </td>
        </tr>
        <tr>
            <td class="style1">
                Discount:
            </td>
            <td class="style1">
                <asp:TextBox ID="txtDiscount" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtDiscount"
                    Display="Dynamic" ErrorMessage="Can not be null"></asp:RequiredFieldValidator>
                <asp:RangeValidator ID="RangeValidator3" runat="server" Display="Dynamic" ErrorMessage="Invalid Input"
                    MaximumValue="1.0" MinimumValue="0.0" Type="Double" ControlToValidate="txtDiscount"></asp:RangeValidator>
            </td>
    </table>
    <br />
    <table>
        <tr>
            <td>
                <asp:Button CssClass="button" ID="btnNew" runat="server" Text="New" OnClick="btnNew_Click"
                    CausesValidation="False" Width="100px" />
                <asp:Button CssClass="button" ID="btnAdd" runat="server" Text="Add" OnClick="btnAdd_Click"
                    Width="100px" />
                <asp:Button CssClass="button" ID="btnUpdate" runat="server" Text="Update" OnClick="btnUpdate_Click"
                    Width="100px" />
                <asp:Button CssClass="button" ID="btnDelete" runat="server" Text="Delete" OnClick="btnDelete_Click"
                    Width="100px" CausesValidation="False" />
            </td>
        </tr>
        <tr>
            <td>
                <asp:TextBox ID="txtSearch" runat="server" Width="148px" ></asp:TextBox>
                
                <asp:DropDownList ID="DDLSearchBy" runat="server" witdh="148px" Height="22px">
                    <asp:ListItem>Product</asp:ListItem>
                    <asp:ListItem>Unit Price</asp:ListItem>
                   
                </asp:DropDownList>
                <asp:Button CssClass="button" ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click"
                    CausesValidation="False" Width="100px" />
            </td>
        </tr>
        <tr>
            <td>
                <asp:Button CssClass="button" ID="btnReload" runat="server" Text="Reload" OnClick="btnReload_Click"
                    CausesValidation="False" Width="100px" />
            </td>
        </tr>
        </tr>
        <td>
            <asp:Button ID="btnBack" runat="server" OnClick="btnBack_Click" Text="Back to Order"
                CausesValidation="False" />
        </td>
        </tr>
    </table>
    <br />
    <asp:GridView ID="gvOrderDetails" runat="server" OnSelectedIndexChanged="gvOrderDetails_SelectedIndexChanged"
        OnPageIndexChanging="gvOrderDetails_PageIndexChanging">
    </asp:GridView>
</asp:Content>
